package cn.zy.pet.service;

import cn.zy.basic.util.AjaxResult;
import cn.zy.basic.util.PageList;
import cn.zy.pet.domain.SearchMasterMsg;
import cn.zy.basic.service.IBaseService;
import cn.zy.pet.dto.MsgDto;
import cn.zy.pet.query.SearchMasterMsgQuery;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zy
 * @since 2023-02-19
 */
public interface ISearchMasterMsgService extends IBaseService<SearchMasterMsg> {

    /**
     * 发布寻主消息
     * @param msg
     * @param request
     * @return
     */
    AjaxResult publish(SearchMasterMsg msg, HttpServletRequest request);

    /**
     * 查询寻主池
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> toSearchMasterPool(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 查询已完成
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> finish(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 查询待处理
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> toHandle(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 查询用户自己
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> user(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 拒单
     * @param id
     */
    void reject(Long id);

    /**
     * 接单
     * @param msgDto
     */
    void accept(MsgDto msgDto);
}
